<html>
	<head>
		<title>a test for selection object</title>
	</head>
	<body>
		<script language='javascript'>
			function showSelectContent(isIncludingHtmlTag){
				var textSelection = document.selection.createRange();
				if (isIncludingHtmlTag){
					alert(textSelection.htmlText);
				}else{
					alert(textSelection.text);
				}
				return false;
			}
		</script>
		<a href='#' onmouseup='javascript:showSelectContent(0);'>select me. show selecting text</a>
		<br />
		<a href='#' onmouseup='javascript:showSelectContent(1);'>select me. show selecting htmlText</a>
	</body>
</html>
